<template>
  <el-card>
    <el-row :gutter="20">
      <el-col :span="10">
        <el-input
          placeholder="请输入内容"
          class="input-with-select"
          v-model="reqData.query"
        >
          <el-button slot="append" icon="el-icon-search" @click="sreach">
          </el-button>
        </el-input>
      </el-col>
      <el-col :span="4">
        <el-button type="primary" @click="openDialog">添加用户</el-button>
      </el-col>
      <el-dialog title="添加用户" :visible.sync="Isdialog">
        <el-form :model="form">
          <el-form-item label="用户名称" :label-width="formLabelWidth">
            <el-input v-model="form.name" autocomplete="off"></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogFormVisible = false">取 消</el-button>
          <el-button type="primary" @click="dialogFormVisible = false"
            >确 定</el-button
          >
        </div>
      </el-dialog>
    </el-row>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      reqData: {
        query: "",
        pagenum: 1,
        pagesize: 1,
      },
      Isdialog: false,
    };
  },
  methods: {
    sreach() {
      this.$store.dispatch("getUser", this.reqData);
    },
    openDialog(){
      this.Isdialog = !this.Isdialog
    }
  },
};
</script>

<style>
</style>